<%@page import="java.util.HashMap"%>
<%@page import="action.YeepayService"%>
<%@page import="java.util.Map"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>页面回调</title>
<%! String formatString(String text){
		return text==null ? "" : text.trim();
	}
%>
<%
	String merchantNo = request.getParameter("merchantNo");
	String parentMerchantNo = request.getParameter("parentMerchantNo");
	String orderId = request.getParameter("orderId");
	String sign = request.getParameter("sign");
	Map<String,String> responseMap = new HashMap<String,String>();
	responseMap.put("merchantNo", merchantNo);
	responseMap.put("parentMerchantNo", parentMerchantNo);
	responseMap.put("orderId", orderId);
	responseMap.put("sign", sign);
	
	boolean flag = YeepayService.verifyCallback(responseMap);
	
	if(!flag) {
		out.println("验签失败!");
		return;
	}
	
%>
</head>
<body>
<table align="center" style="border:solid 1px #107929; margin-top: 40px;  width: 1200px;">
		<tr>
		  	<th align="center" height="30" colspan="5" bgcolor="#6BBE18">
				页面回调通知结果
			</th>
		</tr>
		<tr height="50">
			<td width="15%" align="center">商户编号&nbsp;:</td>
			<td width="30%" align="center"><%=parentMerchantNo %></td>
			<td width="20%">--parentMerchantNo</td>
		</tr>
		<tr height="50">
			<td width="15%" align="center">收款商户编号&nbsp;:</td>
			<td width="30%" align="center"><%=merchantNo %></td>
			<td width="20%">--merchantNo</td>
		</tr>
		<tr height="50">
			<td width="15%" align="center">商户订单号&nbsp;:</td>
			<td width="30%" align="center"><%=orderId %></td>
			<td width="20%">--orderId</td>
		</tr>
	</table>
</body>
</html>